import request from '@/router/axios';

export const getAccountList = (current, size, AccountDTO,startTime,endTime) => {
  return request({
    url: '/api/blade-details/account/page',
    method: 'get',
    params: {
      ...AccountDTO,
      current,
      size,
      startTime,
      endTime
    }
  })
}
export const getUserRoleList = (current, size, UserRoleDTO,startTime,endTime) => {
  return request({
    url: '/api/blade-details/userrole/page',
    method: 'get',
    params: {
      ...UserRoleDTO,
      current,
      size,
      startTime,
      endTime
    }
  })
}
export const getRolePageList = (current, size, UserRoleDTO,startTime,endTime) => {
  return request({
    url: '/api/blade-details/userrole/rolepage',
    method: 'get',
    params: {
      ...UserRoleDTO,
      current,
      size,
      startTime,
      endTime
    }
  })
}
export const getSpendList = (current, size, SpendDTO,startTime,endTime) => {
  return request({
    url: '/api/blade-details/spend/page',
    method: 'get',
    params: {
      ...SpendDTO,
      current,
      size,
      startTime,
      endTime
    }
  })
}

export const getSpendQrList = (current, size, SpendDTO,startTime,endTime,startTimeDb,endTimeDb) => {
  return request({
    url: '/api/blade-details/spend/pageQr',
    method: 'get',
    params: {
      ...SpendDTO,
      current,
      size,
      startTime,
      endTime,
      startTimeDb,
      endTimeDb
    }
  })
}

export const removeSpQr = (ids) => {
  return request({
    url: '/api/blade-details/spend/removeSpQr',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const removeOrdersQr = (orderNums) => {
  return request({
    url: '/api/blade-details/spend/removeOrdersQr',
    method: 'post',
    params: {
      orderNums,
    }
  })
}

export const getSpendRpQrList = (current, size, SpendDTO,startTime,endTime,startTimeDb,endTimeDb) => {
  return request({
    url: '/api/blade-details/spend/pageRpQr',
    method: 'get',
    params: {
      ...SpendDTO,
      current,
      size,
      startTime,
      endTime,
      startTimeDb,
      endTimeDb
    }
  })
}

export const getSpendQrRankList = (current, size, SpendDTO,startTime,endTime) => {
  return request({
    url: '/api/blade-details/spend/pageRankQr',
    method: 'get',
    params: {
      ...SpendDTO,
      current,
      size,
      startTime,
      endTime
    }
  })
}

export const editSpendQr = (spendVO) => {
  return request({
    url: '/api/blade-details/spend/editSpendQr',
    method: 'post',
    data: spendVO

  })
}

export const editSpendQrPromote = (spendVO) => {
  return request({
    url: '/api/blade-details/spend/editSpendQrPromote',
    method: 'post',
    data: spendVO

  })
}

export const spendTotal = (SpendDTO,startTime,endTime) => {
  return request({
    url: '/api/blade-details/spend/spendTotal',
    method: 'get',
    params: {
      ...SpendDTO,
      startTime,
      endTime
    }
  })
}

export const spendQrTotal = (SpendDTO,startTime,endTime,startTimeDb,endTimeDb) => {
  return request({
    url: '/api/blade-details/spend/spendQrTotal',
    method: 'get',
    params: {
      ...SpendDTO,
      startTime,
      endTime,
      startTimeDb,
      endTimeDb
    }
  })
}

export const spendRpQrTotal = (SpendDTO,startTime,endTime,startTimeDb,endTimeDb) => {
  return request({
    url: '/api/blade-details/spend/spendRpQrTotal',
    method: 'get',
    params: {
      ...SpendDTO,
      startTime,
      endTime,
      startTimeDb,
      endTimeDb
    }
  })
}


export const spendRankQrTotal = (SpendDTO,startTime,endTime) => {
  return request({
    url: '/api/blade-details/spend/spendRankQrTotal',
    method: 'get',
    params: {
      ...SpendDTO,
      startTime,
      endTime
    }
  })
}

export const spendPlayTotal = (SpendDTO,startTime,endTime) => {
  return request({
    url: '/api/blade-details/spend/spendPlayTotal',
    method: 'get',
    params: {
      ...SpendDTO,
      startTime,
      endTime
    }
  })
}

export const spendPlayTodayTotal = (SpendDTO,startTime,endTime) => {
  return request({
    url: '/api/blade-details/spend/spendPlayTodayTotal',
    method: 'get',
    params: {
      ...SpendDTO,
      startTime,
      endTime
    }
  })
}
export const getSpendUserList = (current, size, SpendDTO,startTime,endTime) => {
  return request({
    url: '/api/blade-details/spend/spendUser',
    method: 'get',
    params: {
      ...SpendDTO,
      current,
      size,
      startTime,
      endTime
    }
  })
}
export const getPlayList = (current, size, UserRoleDTO) => {
  return request({
    url: '/api/blade-details/userrole/playpage',
    method: 'get',
    params: {
      ...UserRoleDTO,
      current,
      size
    }
  })
}
export const getNewPlayList = (current, size, UserRoleDTO) => {
  return request({
    url: '/api/blade-details/userrole/newplaypage',
    method: 'get',
    params: {
      ...UserRoleDTO,
      current,
      size
    }
  })
}
export const playList = (accountId) => {
  return request({
    url: '/api/blade-details/userrole/playList',
    method: 'get',
    params: {
    accountId
    }
  })
}

export const recordInster = (accountId,account,oldPromoterId,oldPromoterName,newPromoterId,time) => {
  return request({
    url: '/api/blade-details/bladerecord/save',
    method: 'post',
    params: {
      accountId,account,oldPromoterId,oldPromoterName,newPromoterId,time
    }
  })
}
export const recordPage = (current, size, BladeRecord,startTime,endTime) => {
  return request({
    url: '/api/blade-details/bladerecord/page',
    method: 'get',
    params: {
     ...BladeRecord,
      current,
      size,
      startTime,
      endTime
    }
  })
}

export const detailCouponList = (BladeRecord) => {
  return request({
    url: '/api/blade-app/activitycoupon/detailList',
    method: 'get',
    params: {
      ...BladeRecord
    }
  })
}

export const couponList = (BladeRecord) => {
  return request({
    url: '/api/blade-app/coupon/couponlist',
    method: 'get',
    params: {
      ...BladeRecord
    }
  })
}

export const grantCoupon = (da) => {
  return request({
    url: '/api/blade-app/gamecoupon/grantCoupon',
    method: 'post',
    data: da
  })
}

export const grantCouponTmp = (da) => {
  return request({
    url: '/api/blade-app/gamecoupon/grantCouponTmp',
    method: 'post',
    data: da
  })
}

export const grantCouponBatch = (da) => {
  return request({
    url: '/api/blade-app/gamecoupon/grantCouponBatch',
    method: 'post',
    data: da
  })
}

export const promoterList = () => {
  return request({
    url: '/api/blade-details/userrole/promoterList',
    method: 'get'
  })
}
export const recordInsterBatch = (bladeRecord) => {
  return request({
    url: '/api/blade-details/bladerecord/saveBatch',
    method: 'post',
    data : bladeRecord

  })
}
export const getBanAccountList = (current, size, AccountDTO,banStartTime,banEndTime) => {
  return request({
    url: '/api/blade-details/account/banAccountpage',
    method: 'get',
    params: {
      ...AccountDTO,
      current,
      size,
      banStartTime,
      banEndTime
    }
  })
}
// export const updateAccount = (ids) => {
//   console.log("ids",ids)
//   return request({
//     url: '/api/blade-details/account/update',
//     method: 'post',
//     params: {ids}
//   })
// }
export const updateAccount = (AccountDTO) => {
  return request({
    url: '/api/blade-details/account/update',
    method: 'post',
    data: AccountDTO
  })
}
export const selectSpendRoleId = (spendDTO) => {
  return request({
    url: '/api/blade-details/spend/selectSpendRoleId',
    method: 'get',
    params: {
      ...spendDTO
    }
  })
}


export const pageQrConsume = (current, size, SpendDTO) => {
  return request({
    url: '/api/blade-details/spend/pageQrConsume',
    method: 'get',
    params: {
      ...SpendDTO,
      current,
      size
    }
  })
}

export const recoveryBalance = (SpendDTO) => {
  return request({
    url: '/api/blade-details/spend/recoveryBalance',
    method: 'post',
    data: SpendDTO
  })
}

export const pageQrPlayer = (current, size, SpendDTO) => {
  return request({
    url: '/api/blade-details/spend/pageQrPlayer',
    method: 'get',
    params: {
      ...SpendDTO,
      current,
      size
    }
  })
}

export const getSyncTime = () => {
  return request({
    url: '/api/blade-details/spend/getSyncTime',
    method: 'post'
  })
}

export const initSyncData = () => {
  return request({
    url: '/api/blade-details/spend/initQrData',
    method: 'get'
  })
}

export const directConsume = (current, size, SpendDTO,startTime,endTime) => {
  return request({
    url: '/api/blade-details/spend/directConsume',
    method: 'get',
    params: {
      ...SpendDTO,
      current,
      size,
      startTime,
      endTime
    }
  })
}

export const directConsumeTotal = (SpendDTO,startTime,endTime) => {
  return request({
    url: '/api/blade-details/spend/directConsumeTotal',
    method: 'get',
    params: {
      ...SpendDTO,
      startTime,
      endTime
    }
  })
}


export const saveExeclSpendQr = (form) => {
  return request({
    url: '/api/blade-details/spend/saveExeclSpendQr',
    method: 'post',
    data:form

  })
}
export const loadSpendQrSerach = (form) => {
  return request({
    url: '/api/blade-details/spend/loadSpendQrSerach',
    method: 'post',
    data:form

  })
}
export const loadSerachDepartment = (form) => {
  return request({
    url: '/api/blade-details/spend/loadSerachDepartment',
    method: 'post',
    data:form

  })
}
export const loadSerachProgram = (form) => {
  return request({
    url: '/api/blade-details/spend/loadSerachProgram',
    method: 'post',
    data:form

  })
}

export const queryGamesQr = () => {
  return request({
    url: '/api/blade-details/spend/queryGamesQr',
    method: 'post',
    params: {

    }
  })
}

export const getNewPayUserAccountAnalysis = (form) => {
  return request({
    url: '/api/blade-game/analysis/newPayQrUserAnalysis',
    method: 'post',
    data:form
  })
}




export const queryPageSpendQrGames = (params, current, size) => request({
  url: '/api/blade-details/spend/pageSpendQrGames',
  method: 'get',
  params: {
    ...params,
    current,
    size
  }
});


export const saveSpendQrGames = (form) => {
  return request({
    url: '/api/blade-details/spend/saveSpendQrGames',
    method: 'post',
    data:form

  })
}

export const queryFlGamesQr = () => {
  return request({
    url: '/api/blade-details/spend/queryFlGamesQr',
    method: 'post',
    params: {

    }
  })
}

export const queryPageSpendQrGamesProfit = (params, current, size) => request({
  url: '/api/blade-details/spend/pageGameProfitconfig',
  method: 'get',
  params: {
    ...params,
    current,
    size
  }
});
export const getTimeConfigList = (params) => request({
  url: '/api/blade-details/spend/getTimeConfigList',
  method: 'get',
  params: {
    ...params,
  }
});



export const saveSpendQrGamesProfit = (form) => {
  return request({
    url: '/api/blade-details/spend/saveSpendQrGamesProfit',
    method: 'post',
    data:form

  })
}

export const queryPageSpendQrGamesProfitFx = (params, current, size,startTime,endTime) => request({
  url: '/api/blade-details/spend/pageGamesProfitFx',
  method: 'get',
  params: {
    ...params,
    current,
    size,
    startTime,
    endTime
  }
});

export const queryPageSpendQrGamesProfitHz = (params, current, size,startTime,endTime) => request({
  url: '/api/blade-details/spend/pageGamesProfitHz',
  method: 'get',
  params: {
    ...params,
    current,
    size,
    startTime,
    endTime
  }
});

export const pageGamesProfitHzTotal = (params, current, size,startTime,endTime) => request({
  url: '/api/blade-details/spend/pageGamesProfitHzTotal',
  method: 'get',
  params: {
    ...params,
    current,
    size,
    startTime,
    endTime
  }
});

export const loadRpSpendInfo = (from) => {
  return request({
    url: '/api/blade-details/spend/loadRpSpendInfo',
    method: 'post',
    data:from
  })
}

export const saveExeclGamesProfitSet = (form) => {
  return request({
    url: '/api/blade-details/spend/saveExeclGamesProfitSet',
    method: 'post',
    data:form

  })
}

export const appgamewelfarePage = (current, size, BladeRecord,startTime,endTime) => {
  return request({
    url: '/api/blade-details/appgamewelfare/page',
    method: 'get',
    params: {
      ...BladeRecord,
      current,
      size,
      startTime,
      endTime
    }
  })
}

export const demandTotal = (formInline, startTime,endTime) => {
  return request({
    url: '/api/blade-details/sdkdeposit/demandTotal',
    method: 'get',
    params: {
      ...formInline,
      startTime,
      endTime
    }
  })
}

export const recycleDemandTotal = (BladeRecord,startTime,endTime) => {
  return request({
    url: '/api/blade-details/appgamewelfare/demandTotal',
    method: 'get',
    params: {
      ...BladeRecord,
      startTime,
      endTime
    }
  })
}

export const sdkDepositPage = (current, size, BladeRecord,startTime,endTime) => {
  return request({
    url: '/api/blade-details/sdkdeposit/page',
    method: 'get',
    params: {
      ...BladeRecord,
      current,
      size,
      startTime,
      endTime
    }
  })
}

export const waterDemandTotal = (BladeRecord,startTime,endTime) => {
  return request({
    url: '/api/blade-details/spend/demandTotal',
    method: 'get',
    params: {
      ...BladeRecord, startTime,endTime
    }
  })
}

export const waterPage = (current, size, BladeRecord,startTime,endTime) => {
  return request({
    url: '/api/blade-details/spend/waterPage',
    method: 'get',
    params: {
      ...BladeRecord,
      current,
      size,
      startTime,
      endTime
    }
  })
}
